package string;

public class ReplaceAll {
    public static void main(String[] args) {
        String regex = "(gun|shaX|sb)";
        String message = "你shaX，快gun";
        message = message.replaceAll(regex,"***");
        System.out.println(message);
        String message2 = "123abc456def";
        message2 = message2.replaceAll("[0-9]+","#NUMBRE#");
        System.out.println(message2);
    }
}
